1. Field of the Invention
The present invention relates generally to the efficient operation of variable speed stepper-type electric motors, and more particularly to a method for providing improved control of an electric stepper motor by varying the amount of power supplied to the motor at different speeds in relation to the amount of power required by the motor according to a pre-configured table, without relying on feedback from the motor itself.
2. Description of the Prior Art
Variable speed electric motors, particularly stepper motors, are employed in a wide variety of applications where precise movements are desired. A typical application of a variable speed motor is in a closed circuit television (CCTV) system where a surveillance camera unit is mounted on a movable base. Movement is imparted to the base (and hence to the camera) using one or more variable speed electric motors that cause the camera to scan, pan and/or tilt. It is common to use stepper motors in these applications because such motors are capable of providing the precise movements required by surveillance cameras.
A stepper motor""s shaft has permanent magnets attached to it, together these are called the rotor. Around the body of the motor is a series of coils (windings) that create a magnetic field that interacts with the permanent magnets. When these coils are turned on and off the magnetic field causes the rotor to move. As the coils are turned on and off in a certain sequence the motor will rotate forward or reverse. This is called the phase pattern and there are several types that will cause the motor to turn.
To make a stepper motor rotate, the coils must be constantly turned on. If one coil of the motor is energized, the rotor will jump to that position and stay there resisting change. This energized coil pulls full current even though the motor is not turning. This ability to stay put at one position rigidly is an advantage of stepper motors. The torque at stand still is called the holding torque. Because stepper motors can be controlled by turning on and off coils, they are easy to control using digital computers. The computer simply energizes the coils in a certain pattern and the motor moves accordingly. At any given time the computer will know the position of the motor since the number of steps given can be stored.
When other than full power is applied to the coils, the rotor will move to intermediate positions. This is referred to as xe2x80x9cmicro-steppingxe2x80x9d the motor. A common type of signal used for micro-stepping is a pair of orthogonally related pseudo-sine waves. Different actual pseudo-sine waves may be generated. Stepper motors are limited in the amount of torque they can produce in comparison with DC brush motor (this is the other common type of DC motor). Stepper motors are typically rated with a holding torque which is the amount of torque they can hold without slipping with the coils energized at the rated voltage. The holding torque is not the amount of torque they can actually turn. Stepper turning torque is a fraction of the rated holding torque.
Unlike brush motors whose torque increases with speed, steppers have more torque at lower speeds. Stepper motors also have a much lower maximum speed than a brush motor.
The stepper motor coils are typically rated for a particular voltage. The coils act as inductors when voltage is supplied to them. As such, the coils do not instantly draw their full current, and in fact may never reach full current at high stepping frequencies. The electromagnetic field produced by the coils is directly related to the amount of current they draw. The larger the electromagnetic field the more torque the motors have the potential of producing. The solution to increasing the torque is to ensure that the coils reach full current during each step. This is accomplished by increasing the voltage the coil is excited with while never exceeding the manufacturer""s current rating. To accomplish this, some kind of current limiting scheme is necessary. A series resistor between the higher than rated power supply and the coil is common. (As current increases so will the voltage drop across the resistor and therefore limit the voltage across the coils and protect them from damage.)
Some level of power must be supplied to a stepper motor at all times, even when the rotor is in a stationary position. The direction of rotation of the motor rotor is determined by variably switching the amount and polarity of the power supplied across the motor windings. The speed (frequency) of rotation of rotor is determined in part by the amount of power delivered, but primarily by how quickly the supply of power to the motor coils is changed. The amount of power supplied may be varied by varying the amount of the voltage or by varying the amount of time that a fixed voltage is provided. The latter procedure is known as pulse width modulation (PWM).
A typical stepper motor has a given inductance based on the number of motor windings, with more/longer windings providing additional inductance. Additional windings are preferred because they allow for smoother operation and more strength, or torque, in the motor. Thus, a typical strong stepper motor will have a higher inductance than a weaker motor for equal amounts of current.
As an electric motor is operated, its speed (RPM or frequency) may be increased according to the needs of the application. The usable speed of a stepper motor is determined by available torque which is directly proportional to current driven through the motor. The current in the motor is limited by the resistance of the windings, the inductance of the windings, and the back EMF (electromotive force) of the motor. As the frequency of the applied power to the motor increases, so also does the reactance in the motor circuit, the reactance being a function of the inductance (i.e. size and number of windings) and the resistance of the motor itself. Thus, at higher speeds additional power must be supplied for proper operation (i.e. sufficient torque) in order to compensate for the increased reactance and back EMF. At lower speeds, there is less reactance, and less back EMF such that less power is required.
If too much power is supplied when back EMF is low (i.e. when the motor is moving at low speeds or is stationary), the motor will draw excessive current which may damage or shorten the life of the motor components. If the applied power is not increased when back EMF increases (i.e., as speed increases), there will be insufficient current flow, and the motor will not have enough power available to operate correctly (i.e., it will run under-power with diminished strength or torque).
Even when not moving, a typical stepper motor will continue to require a small amount of power in order to maintain its current position In surveillance camera applications, the motors operating the camera may be brought to a stationary position and left there for long periods of time (days, weeks or even months). Providing full power over such long periods of time to a stationary motor is wasteful and is likely to burn out motor components. It is estimated that on average, the amount of power required by a stepper motor in a CCTV application is between xc2xc and ⅓ of the maximum power available. It is therefore desirable to limit the amount of power supplied to the motors operating a surveillance camera in relation to the amount of power required by the motors whether moving or not.
Many stepper motor manufacturers recommend that a particular current be provided to the motor for proper performance. It is typical for the current supplied to a stepper motor to be changed in accordance with the demands of the motor. However, in many surveillance camera applications as well as other applications, power is only available at one voltage level making it impossible to vary the level of current actually supplied to the motor. In some situations, the power supply may not be consistent resulting in variations in the available voltage.
In surveillance camera systems, it is also important to know the position of the camera at all times. This allows the camera operator to be aware of the direction the camera is currently pointed in, and to be able to move the camera to point in another direction if desired. In existing systems, feedback is received from the motors that move the camera in order to keep track of the camera""s position. For example, U.S. Pat. No. 5,534,763 discloses a microprocessor and a software look-up table which compares instantaneous feedback information from the motor with target information to adjust the input to the motor. Such applications require the deployment of sensors in the motors and corresponding translation circuitry in the microprocessor controlling the motors. Elimination of these components would reduce cost and complexity, and make more of the microprocessor capacity available for other uses.
Because of the heavy demands made on microprocessors deployed to operate surveillance cameras, it is advantageous to eliminate as many unnecessary real time computations as possible to free up microprocessor resources for other uses. It is also advantageous, although not necessary, for efficient computer processing to use whole numbers.
It is therefore desirable to provide an inexpensive way to control the power supplied to the electric motors used to operate surveillance cameras in real time in relation to the variable speeds of the motors, particularly in situations where only one voltage level is available, without unduly taxing the camera""s microprocessor such that the positions of the motors are known without requiring feedback from the motors themselves.
The present invention provides a method and apparatus, including a processor and software incorporating a table that contains sets of pre-determined correction values that are used to supply different amounts of power to an electric motor when the motor is operating at different speeds. Use of the correction values in the table allows power to be supplied to the motor in differing amounts that are approximately the same as the power actually required by the motor at different motor speeds or ranges of speeds. The table is established based on the characteristics of the motor (e.g. the number of windings, the inductance, the number of steps or sub-steps, etc.), the speeds (frequencies) at which the motor is expected to operate, and the amount of voltage and current available in the driving circuit for use by the motor. With this information, a table is generated which contains sets of correction values that correspond to different instantaneous speeds or ranges of speeds for the motor. By using the values in the table, particularly at low speeds, only the amount of power actually required by the motor is delivered to it.
It is possible to determine the approximate amount of power required and consumed by a stepper motor at increasing speeds. These factors are generated into a look-up table that is used in varying the time over which full power is applied to the motor, or in varying the amount of voltage applied to the motor, at different speeds.
In many cases, it is only possible to deliver either all or none of an available voltage to the motor. In such cases, variances in power are accomplished by varying the length of time that such full-voltage power is delivered (i.e., shorter or longer xe2x80x9cpulsesxe2x80x9d of the same strength). This is known as pulse width modulation (PWM). In other cases, it may be possible to vary the amount of voltage delivered. In these cases, variable voltage amounts may be provided for the same lengths of time (i.e., variable strength but same-length xe2x80x9cpulsesxe2x80x9d) to accomplish the same result. Thus, the amount of power delivered is a function of the voltage supplied with the current and/or the length of time that it is delivered. Accordingly, by varying either the voltage or the time of delivery (or both), it is possible to change the amount of power delivered to the motor. The present invention is directed primarily toward varying the length of time that a full-voltage charge is delivered; however, the sets of correction values in the tables generated according to the present invention have equal application to situations where variable voltages are applied.
By supplying only the amount of power actually feqifed required by the motor, the motor is able to operate at full torque without wasting power or risking bum-out of motor components. This provides a high degree of accuracy in motor control such that the position of the motor may be known at all times without requiring feedback from the motor itself
The present invention is also capable of sensing and compensating for fluctuations in the available power in the drive circuit.
The amount of force available to a motor is determined by the strength of its magnetic fields and is proportional to the electric current flowing through the windings. In electrical circuits involving inductance (or capacitance, or both), the amount of xe2x80x9cworkxe2x80x9d done is related to a power factor (real power/apparent power) of the system. The closer to unity (i.e., the closer to 1) that the power factor is, then the more efficient the system is. Some systems attempt to control the power factor to obtain good motor control. In the present invention, the amplitude of the driving signal is modified to get the same effect. There are many different ways that the driving signal may be modified to provide good motor control, including any appropriate mathematical operation (addition, subtraction, multiplication, and/or division) performed on the driving signal. However, each such implementation of the present invention should accomplish providing more signal to the motor as its rotation increases.
It is therefore a primary object of the present invention to provide a method and apparatus for supplying variable power to a stepper motor based upon the selected motor speed in order that the power supplied to the motor is approximately equal to the amount of power required and consumed by the motor at such speed, particularly when the motor is stationary or moving at low speeds.
It is also a primary object of the present invention to provide a method for establishing tables of correction values for use in controlling the amount of power delivered to a stepper motor in relation to the motor speed, each such table being tailored to the particular characteristics of the motor as well as its environment.
It is also a primary object of the present invention to provide a method and apparatus that supplies sufficient power to a stepper motor at different motor speeds to meet the requirements of the motor in order that the motor has sufficient torque to move to the position it is expected to be in so that no feedback is necessary from the motor to confirm such position.
It is another object of the present invention to avoid supplying unnecessary power to a stepper motor when the motor is stationary for long periods of time in order to avoid damaging the motor components.
It is another object of the present invention to provide a method for varying the amount of power supplied to a stepper motor using a table containing sets of correction values tailored to the particular motor and its environment, each set of values corresponding to a different motor speed or range of speeds, such that a different set of values is applied to the power delivered to the motor depending upon the motor speed.
It is another object of the present invention to provide a computer program for variably controlling the power supplied to a stepper motor by establishing and using a table containing sets of correction values tailored to the particular motor, each set corresponding to a different speed or range of speeds of the motor, in which different values from the table are used to provide power to the motor according to its speed by applying the factors to a single voltage available in the driving circuit using pulse width modulation.
It is another object of the present invention to avoid wasteful delivery of excess power to a stepper motor when it is at rest or moving at slow speeds.
It is another object of the present invention to provide a method and apparatus for maintaining more consistent control over the operation of a stepper motor so as to know the position of the motor at any given time without requiring feedback from the motor.
It is another object of the present invention to provide variable power to a stepper motor according to as set of motor-specific values contained in a look-up table by varying the length of time that pulses of single-voltage power are supplied to the motor using pulse width modulation.
It is another object of the present invention to sense and compensate for fluctuations in the voltage available in the drive circuit for a stepper motor using pulse width modulation.
Additional objects of the invention will be apparent from the detailed descriptions and the claims herein.